package cn.sherer.beans.kuaishou;

/**
 * 快手用户信息
 */
public class KsUser extends KsResult {
    private String name;
    private String sex;
    private int fan;
    private int follow;
    private String head;
    private String bigHead;

    public KsUser() {
    }

    public KsUser(int result, String error_msg) {
        super(result, error_msg);
    }

    public KsUser(int result, String error, String error_msg) {
        super(result, error, error_msg);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getGender() {
        return sex == null ? 0 : (sex.toUpperCase().equals("M") ? 1 : (sex.toUpperCase().equals("F") ? 2 : 0));
    }

    public int getFan() {
        return fan;
    }

    public void setFan(int fan) {
        this.fan = fan;
    }

    public int getFollow() {
        return follow;
    }

    public void setFollow(int follow) {
        this.follow = follow;
    }

    public String getHead() {
        return head;
    }

    public void setHead(String head) {
        this.head = head;
    }

    public String getBigHead() {
        return bigHead == null || bigHead.isEmpty() || bigHead.trim().isEmpty() ? head : bigHead;
    }

    public void setBigHead(String bigHead) {
        this.bigHead = bigHead;
    }

    @Override
    public String toString() {
        return "KsUser{" + "result=" + this.getResult() + ", error=" + this.getError() + ", error_msg=" + this.getError_msg() + ", name=" + name + ", sex=" + sex + ", gender=" + this.getGender() + ", fan=" + fan + ", follow=" + follow + ", head=" + head + ", bigHead=" + bigHead + '}';
    }
}
